package a.f.j;

import a.c.q;
import a.i.mb;

public class f
  implements m
{
  private cb a;
  private boolean b = false;
  private boolean c = false;
  private boolean d = false;
  private boolean e = false;
  private int f = -1;
  private int g = 30;
  private mb h = new mb();
  private int i = 0;
  private int j = 0;
  private int k = 0;
  public static final short l = 0;
  public static final short m = 1;
  public static int n;
  
  public void a(cb paramcb)
  {
    this.a = paramcb;
  }
  
  public void a(boolean paramBoolean)
  {
    this.c = paramBoolean;
  }
  
  public boolean c()
  {
    return this.c;
  }
  
  public void b(boolean paramBoolean)
  {
    this.d = paramBoolean;
  }
  
  public boolean d()
  {
    return this.d;
  }
  
  public void c(boolean paramBoolean)
  {
    this.e = paramBoolean;
  }
  
  public boolean e()
  {
    return this.e;
  }
  
  public void a(int paramInt)
  {
    this.f = paramInt;
  }
  
  public int f()
  {
    return this.f;
  }
  
  public void d(boolean paramBoolean)
  {
    this.b = paramBoolean;
  }
  
  public boolean g()
  {
    return this.b;
  }
  
  public int h()
  {
    return this.g;
  }
  
  public void b(int paramInt)
  {
    this.g = paramInt;
  }
  
  public int i()
  {
    return this.i;
  }
  
  public int j()
  {
    return this.j;
  }
  
  public int k()
  {
    return this.k;
  }
  
  public void a()
  {
    boolean bool = ab.g;
    int i1 = ab.f;
    StringBuffer localStringBuffer = new StringBuffer();
    localStringBuffer.append("\n***************************************");
    localStringBuffer.append("********   PLANAR EMBEDDING    ********");
    localStringBuffer.append("***************************************");
    a.i.n.a(this, 0, localStringBuffer);
    localStringBuffer = new StringBuffer();
    localStringBuffer.append("\nSETTINGS:");
    localStringBuffer.append("  use biconnected components: " + this.d);
    if (!bool)
    {
      localStringBuffer.append("  edge rerouting enabled    : " + this.c);
      if (this.f == -1)
      {
        localStringBuffer.append("  no reroute iterations bound");
        if (bool) {
          break label228;
        }
        if (i1 == 0) {
          break label190;
        }
        if (!bool) {}
        q.n = !q.n;
      }
    }
    localStringBuffer.append("  reroute iterations        : " + this.f);
    label190:
    localStringBuffer.append("  allow randomization       : " + this.b + "\n");
    a.i.n.a(this, 3, localStringBuffer);
    label228:
    if (this.a == null) {
      throw new RuntimeException("Forgot to set PlanarInformation!");
    }
    y localy = new y(this.a);
    localy.a();
    a.c.ab localab1 = new a.c.ab(this.a.a().w());
    u localu = new u();
    localu.a(this.a.a());
    this.h.g();
    Object localObject1 = null;
    if (!bool) {
      if (this.d)
      {
        localObject1 = new d(a((short)0));
        break label346;
      }
    }
    localObject1 = a((short)0);
    label346:
    ((s)localObject1).a(this.a);
    this.i = ((int)this.h.d());
    if (this.e)
    {
      localObject2 = null;
      localObject2 = new a.f.j.a.d();
      ((a.f.j.a.d)localObject2).a(this.a);
    }
    Object localObject2 = new l(this.a);
    a.c.ab localab2 = ((s)localObject1).b();
    a.i.n.a(this, 3, "HANDLE MULTIPLE EDGES !");
    localy.b();
    localu.a(this.a, localab2);
    localu.a();
    this.h.g();
    a.i.n.a(this, 0, "REINSERTION: " + localab2.size() + "  graph edges");
    ((l)localObject2).a(localab2);
    if (!bool)
    {
      if (a.i.n.c(this))
      {
        if (bool) {
          break label559;
        }
        if (!this.a.h()) {
          throw new RuntimeException("Combinatorial Embedder failed !");
        }
      }
      this.j = ((int)this.h.d());
      this.h.g();
      if (bool) {
        break label640;
      }
    }
    if (this.c)
    {
      label559:
      a.i.n.a(this, 0, "REROUTE EDGES");
      a.i.n.a(this, 0, "  number of crossings (before rerouting): " + this.a.n());
      ((l)localObject2).a(this.f, localab1);
      a.i.n.a(this, 0, "  number of crossings (after rerouting): " + this.a.n());
    }
    label640:
    this.k = ((int)this.h.d());
    Object localObject3 = null;
    o localo = this.a.b();
    label743:
    do
    {
      if (!localo.e()) {
        break;
      }
      n localn = localo.a();
      if (i1 != 0) {
        break label797;
      }
      if (!bool) {
        if (localObject3 == null)
        {
          localObject3 = localn;
          if (bool) {
            continue;
          }
          if (i1 == 0) {
            break label743;
          }
        }
      }
      if (!bool)
      {
        if (localObject3.a().k() < localn.a().k()) {
          localObject3 = localn;
        }
        localo.f();
      }
    } while (i1 == 0);
    this.a.a(localObject3);
    this.a.e();
    a.i.n.a(this, 0, "\n**********************************");
    a.i.n.a(this, 0, "***** PLANAR EMBEDDING DONE! *****");
    if (!bool) {
      a.i.n.a(this, 0, "**********************************\n");
    }
    label797:
    if (bool) {
      q.o = !q.o;
    }
  }
  
  public void b()
  {
    this.a.o();
    this.a.i();
  }
  
  protected s a(short paramShort)
  {
    switch (paramShort)
    {
    case 0: 
      r localr = new r();
      localr.a(this.b);
      localr.a(this.g);
      return new x(localr);
    case 1: 
      return new b();
    }
    return null;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.j.f
 * JD-Core Version:    0.7.0.1
 */